<template>
	<div class="father">
		<h3>父组件</h3>
		<h4>车:{{ one }}</h4>
		<h4 v-show="two">儿子给的玩具：{{ two }}</h4>
		<Child :sentoTwo="sentoTwo" :one="one" />
	</div>
</template>

<!-- 安装 vue 路由模块  npm install vue-router -->

<!-- npm i vite-plugin-vue-setup-extend -D -->
<script setup lang="ts" name="Father">
import { ref } from 'vue';
import Child from './Child.vue'
let one = ref("奔驰")
let two = ref("")
function sentoTwo(val: string) {
	two.value = val
}
</script>

<style scoped>
.father {
	background-color: rgb(165, 164, 164);
	padding: 20px;
	border-radius: 10px;
}
</style>